package homework;

import java.util.ArrayList;
import java.util.Random;

public class java12 {
	public static void main(String[] args) {
		ArrayList<Integer> test=new ArrayList<Integer>();
		getlist(test);
		System.out.println(test);
		showlist(test);
	}
	public static void getlist(ArrayList<Integer> test) {
		Random r=new Random();
		while(test.size()<6) {
			Integer i=r.nextInt(100);
			if(!(test.contains(i))) {
				test.add(i);
			}
		}
	}
	public static void showlist(ArrayList<Integer> test) {
		for(int i=0;i<test.size();i++) {
			if(i==0) {
				System.out.print("{"+test.get(i)+"@");
			}
			else if(i==test.size()-1) {
				System.out.print(test.get(i)+"}");
			}
			else {
				System.out.print(test.get(i)+"@");
			}
		}
	}
}
